#ifndef __DS1302_H__
#define __DS1302_H__

// 寄存器时钟写入指令地址
#define DS1302_RTC_WRITE_SECOND 0x80
#define DS1302_RTC_WRITE_MINUTE 0x82
#define DS1302_RTC_WRITE_HOUR   0x84
#define DS1302_RTC_WRITE_DATE   0x86
#define DS1302_RTC_WRITE_MONTH  0x88
#define DS1302_RTC_WRITE_DAY    0x8A
#define DS1302_RTC_WRITE_YEAR   0x8C
#define DS1302_RTC_WRITE_WP     0x8E

void DS1302_init();
void DS1302_setTime(unsigned char DS1302_timeArr[]);
void DS1302_getTime(unsigned char DS1302_timeArr[]);

#endif